<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
       box{
           background-color: rgb(255,255,255);
       }
    </style>
</head>

<das>
    <!-- <canvas id="box" width="500" height="500"></canvas> -->
    
</body>
<script>
    window.onclick = () => {

        var x = event.clientX
        var y = event.clientY
        // fn(x,y)
        var diy=document.createElement("div")
        diy.style.width="30px"
        diy.style.height="30px"
        diy.style.position="absolute"
        diy.style.top=y+"px" 
        diy.style.left=x+"px"
        diy.style.backgroundColor=rangeColor()
        setTimeout(()=>{
            diy.style.display="none"
        },500)
        document.querySelector("body").appendChild(diy)

        
       
    }

function fn(x,y){
    var canvas = document.getElementById('box')
        var ctx = canvas.getContext('2d');

        ctx.beginPath();
    ctx.arc(x, y, 50, 0, Math.PI * 2, true); // 绘制
    ctx.moveTo(x+35, y);
    ctx.arc(x, y, 35, 0, Math.PI, false);   // 口(顺时针)
    ctx.moveTo(x-15, y-10);
    ctx.arc(x-15, y-10, 5, 0, Math.PI * 2, true);  // 左眼
    ctx.moveTo(x+20, y-10);
    ctx.arc(x+20, y-10, 5, 0, Math.PI * 2, true);  // 右眼
    ctx.stroke();
}

function rangeColor(){
    let r = Math.floor(Math.random()*256);
        let g = Math.floor(Math.random()*256);
        let b = Math.floor(Math.random()*256);
        let rgb = `rgb(${r},${g},${b})`;
        return rgb;

}

function res(num1,num2){
   
    return function ff(){
        num1+num2
    }
    
}
var a=res(1,2)
console.log(a);
var a=parseInt("111办公室");
alert(a)
</script>

</html>